package com.castle.fortress.admin.cms.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
/**
 * cms模板管理表 实体类
 *
 * @author castle
 * @since 2022-02-28
 */
@Data
@ApiModel(value = "cmsTemplate对象", description = "cms模板管理表")
public class CmsTemplateDto implements Serializable {
	private static final long serialVersionUID = 1L;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "主键")
	@JsonProperty("id")
	private Long id;
	@ApiModelProperty(value = "模板标题")
	@JsonProperty("title")
	private String title;
	@ApiModelProperty(value = "封面路径")
	@JsonProperty("coverPath")
	private String coverPath;
	@ApiModelProperty(value = "状态")
	@JsonProperty("status")
	private Integer status;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "创建时间")
	@JsonProperty("createTime")
	private Date createTime;
	@ApiModelProperty(value = "模板文件夹路径")
	@JsonProperty("dirPath")
	private String dirPath;
	@ApiModelProperty(value = "模板文件名")
	@JsonProperty("fileName")
	private String fileName;
	@ApiModelProperty(value = "模板文件状态")
	@JsonProperty("contents")
	private String contents;

}
